<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2018 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: Dean <zxxjjforever@163.com>
// +----------------------------------------------------------------------
namespace plugins\crawler\model;
use think\Model;

//use app\admin\model\PortalCategoryModel;

class CrawlerRuleModel extends Model
{
    // 设置当前模型对应的完整数据表名称
    //protected $table = 'crawler_rule';

    /**
     * 关联 category 表
     * @return $this
     */
    public function category()
    {
        return $this->hasOne('app\portal\model\PortalCategoryModel', 'id', 'category_id');  
    }

    /**
     * 关联 dictionary 表
     * @return $this
     */
    public function dictionary()
    {
        return $this->hasOne('plugins\crawler\model\DictionaryModel', 'id', 'dictionary_id');  
    }
    
}